home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / dvtools / demos / cpitdemo / cpit_vars.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-08  |  2.3 KB  |  75 lines

  1. /*------------------------------------------------------------------
  2. | file name -- cpit_vars.h
  3. |-----------------------------------------------------------------*/
  4.  
  5. /* REFERENCE the global variables for DISPLAY */
  6. extern DV_BOOL    ApplicationState;
  7.  
  8. /* REFERENCE the global variables for the DISPLAY */
  9. extern DRAWPORT     ActiveDrawport, MenuDrawport;    
  10. extern VIEW         ActiveView;
  11. extern OBJECT     MenuScreen, MainScreen, ActiveScreen;
  12.  
  13. extern CHAR *ActiveOverlayName;
  14.  
  15. extern SYMTABLE
  16.    DpTable,            /* table for Room DRAWPORT management */
  17.    ViewTable;            /* table for overlay VIEW management */
  18.  
  19. #define NUM_DISPLAYS    4    
  20. #define NUM_OVERLAYS    5    
  21.  
  22. extern CHAR 
  23.   *MainViewNames[],        /* Preload Main view file names */
  24.   *OverlayViewNames[];        /* Preload Overlay view file names */
  25.  
  26. /* Define a structure that will keep track of display lists */
  27. typedef struct DISPLAY_LIST
  28.   {
  29.   DRAWPORT drawport;
  30.   struct DISPLAY_LIST *prev;
  31.   } DISPLAY_LIST;
  32.             
  33. extern DISPLAY_LIST *DisplayList;    /* Pointer to list of Displays */
  34.  
  35. /* CONSTANTS */
  36. #define WAIT_VIEW     "intro.v"    /* view for preloading views */
  37. #define MENU_VIEW     "menu.v"    /* view for preloading views */
  38.  
  39. #define DEFAULT_SIZE     (RECTANGLE*)NULL
  40. #define DEFAULT_PORTION (RECTANGLE*)NULL
  41.  
  42. /* Display Manager flags */
  43. #define RUNNING        1
  44. #define NOT_RUNNING    0
  45. #define RESET_DISPLAY      0        
  46. #define NEXT_DISPLAY       1
  47. #define PREV_DISPLAY       2
  48.  
  49. /* Hot Spot Names */
  50. #define QUIT_COMMAND       'Q'
  51. #define GOTO_COMMAND       'G'
  52. #define NEXT_COMMAND        'N'
  53. #define PREVIOUS_COMMAND  'P'
  54. #define OVERLAY_COMMAND      'O'
  55. #define DELETE_COMMAND      'D'
  56.  
  57. /* MISC MACROs */
  58. #define STRINGS_ARE_EQUAL( str1, str2 ) strcmp( str1, str2 ) == 0
  59.  
  60. /* ERROR MESSAGE MACROs */
  61. #define EXIT_IF_INVALID( a, string ) if( !a ) \
  62.                                        { (VOID)printf(string); exit(EXIT_ERR);}
  63. #define EXIT2_IF_INVALID( a, s1, s2 ) if( !a ) \
  64.                                        { (VOID)printf(s1, s2); exit(EXIT_ERR);}
  65.  
  66. #define RETURN_IF_INVALID( a, string ) if( !a ) \
  67.                                        { (VOID)printf(string); return;}
  68.  
  69. #define RETURN2_IF_INVALID(a, s1, s2 ) if (!a)  \
  70.                     { (VOID)printf( s1,s2);}
  71.  
  72. #define NO_DEVICE "DataViews environment variable DVDEVICE must be defined.\n"
  73. #define NO_TOP_VIEW "Top View can't be loaded.\n"
  74. #define NO_MENU_VIEW "Menu View can't be loaded.\n"
  75.